Field
Embodiments of the present invention generally relate to the field of networking. In particular, various embodiments relate to bridging an Internet Protocol version 4 (IPv4) network and an Internet Protocol version 6 (IPv6) network.
Description of the Related Art
IPv4 addresses are 32-bit Internet addresses and the IPv4 address space comprises about 4.3 billion addresses. Because of the shortage of IPv4 addresses, IPv6 addresses, which have a size of 128 bits, have begun to be used for IP networks. The full adoption of IPv6 addresses will take a long time and IPv4 addresses and IPv6 addresses will co-exist during the transition. To enable the communication between an IPv4-addressed network appliance (i.e., a network appliance on an IPv4 network) and an IPv6-addressed network appliance (i.e., a network appliance on an IPv6 network), network address translation (i.e., NAT from IPv6 to IPv4 (NAT64) and NAT from IPv4 to IPv6 (NAT46)) is used for translating data packets from one protocol to the other and send the translated data packets to the destinations.
A NAT64/46 protocol bridge comprises at least two network interface controllers (NICs), one is for connecting an IPv4 network and one is for connecting to an IPv6 network. Suppose a data packet that is being sent from an IPv6 network appliance to an IPv4 network appliance is received by a NIC of the NAT64/46 protocol bridge, an IPv6 session between the IPv6 network appliance and the NAT64/46 protocol bridge is created in a kernel space of the NAT64/46 protocol bridge. Then the data packet is sent to a NAT64/46 application in the user space to translate the IPv6 address to an IPv4 address. After the translation, an IPv4 data packet is recomposed using the translated IPv4 tuple information. The recomposed IPv4 data packet is then sent to its destination through an IPv4 session between the IPv4 network appliance and the NAT64/46 protocol bridge. Since processing data packets in user space incurs kernel space/user space context switching, it is desirable for a NAT64/46 protocol bridge to handles address translation only in kernel space.
Further, some NAT64/46 protocol bridges use a dedicate session mapping table to manage the mapping of IPv4 sessions and IPv6 sessions of each transmission protocol. It is too complicate to maintain dedicated session mapping tables in kernel space. Therefore, it is desirable to extend the system tables that are used for managing sessions between hosts of IPv4 networks and IPv6 networks to manage the mapping of IPv4 sessions and IPv6 sessions for any transmission protocols.